.class public Lcom/netease/mobistat/util/Constant;
.super Ljava/lang/Object;
.source "Constant.java"


# static fields
.field public static final ARTICLE_PATH:Ljava/lang/String; = "/home/mobistat/article.txt"

.field public static final BASE_PORT:I = 0x1389

.field public static final BASE_SERVER:Ljava/lang/String; = "mt.c.3g.163.com"

.field public static final COMMAND_DOWNLINK:Ljava/lang/String; = "Android:downlink"

.field public static final COMMAND_EXIT:Ljava/lang/String; = "exit"

.field public static final COMMAND_WHOAMI:Ljava/lang/String; = "Android:whoami"

.field public static final DOWNLINK_TIMES:J = 0x5L

.field public static final PORT_DOWNLINK:I = 0x1389

.field public static final PORT_STAT:I = 0x138b

.field public static final PORT_WHOAMI:I = 0x138a

.field private static downlinkArticle:Ljava/lang/String;

.field private static statinfo:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 10
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static getDownlinkArticle()Ljava/lang/String;
    .locals 7

    .prologue
    .line 34
    const-class v6, Lcom/netease/mobistat/util/Constant;

    monitor-enter v6

    .line 35
    :try_start_0
    sget-object v5, Lcom/netease/mobistat/util/Constant;->downlinkArticle:Ljava/lang/String;

    invoke-static {v5}, Lcom/netease/mobistat/util/StringUtil;->isBlank(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_0

    .line 36
    new-instance v4, Ljava/lang/StringBuffer;

    const-string v5, ""

    invoke-direct {v4, v5}, Ljava/lang/StringBuffer;-><init>(Ljava/lang/String;)V

    .line 37
    .local v4, sb:Ljava/lang/StringBuffer;
    new-instance v1, Ljava/io/File;

    const-string v5, "/home/mobistat/article.txt"

    invoke-direct {v1, v5}, Ljava/io/File;-><init>(Ljava/lang/String;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 39
    .local v1, file:Ljava/io/File;
    :try_start_1
    new-instance v2, Ljava/io/BufferedReader;

    new-instance v5, Ljava/io/FileReader;

    invoke-direct {v5, v1}, Ljava/io/FileReader;-><init>(Ljava/io/File;)V

    invoke-direct {v2, v5}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V

    .line 41
    .local v2, input:Ljava/io/BufferedReader;
    :goto_0
    invoke-virtual {v2}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v3

    .local v3, line:Ljava/lang/String;
    if-nez v3, :cond_1

    .line 44
    invoke-virtual {v4}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v5

    sput-object v5, Lcom/netease/mobistat/util/Constant;->downlinkArticle:Ljava/lang/String;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    .line 34
    .end local v2           #input:Ljava/io/BufferedReader;
    .end local v3           #line:Ljava/lang/String;
    :cond_0
    :goto_1
    :try_start_2
    monitor-exit v6
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 51
    sget-object v5, Lcom/netease/mobistat/util/Constant;->downlinkArticle:Ljava/lang/String;

    return-object v5

    .line 42
    .restart local v2       #input:Ljava/io/BufferedReader;
    .restart local v3       #line:Ljava/lang/String;
    :cond_1
    :try_start_3
    invoke-virtual {v4, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0

    goto :goto_0

    .line 45
    .end local v2           #input:Ljava/io/BufferedReader;
    .end local v3           #line:Ljava/lang/String;
    :catch_0
    move-exception v0

    .line 46
    .local v0, e:Ljava/lang/Exception;
    :try_start_4
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 47
    const-string v5, "Error in Test"

    sput-object v5, Lcom/netease/mobistat/util/Constant;->downlinkArticle:Ljava/lang/String;

    goto :goto_1

    .line 34
    .end local v0           #e:Ljava/lang/Exception;
    .end local v1           #file:Ljava/io/File;
    :catchall_0
    move-exception v5

    monitor-exit v6
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    throw v5
.end method

.method public static declared-synchronized getStatinfo()Ljava/lang/String;
    .locals 2

    .prologue
    .line 59
    const-class v0, Lcom/netease/mobistat/util/Constant;

    monitor-enter v0

    :try_start_0
    sget-object v1, Lcom/netease/mobistat/util/Constant;->statinfo:Ljava/lang/String;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v0

    return-object v1

    :catchall_0
    move-exception v1

    monitor-exit v0

    throw v1
.end method

.method public static declared-synchronized setStatinfo(Ljava/lang/String;)V
    .locals 2
    .parameter "stat"

    .prologue
    .line 55
    const-class v0, Lcom/netease/mobistat/util/Constant;

    monitor-enter v0

    :try_start_0
    sput-object p0, Lcom/netease/mobistat/util/Constant;->statinfo:Ljava/lang/String;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 56
    monitor-exit v0

    return-void

    .line 55
    :catchall_0
    move-exception v1

    monitor-exit v0

    throw v1
.end method
